New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pacote/is-plain-object

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pacote/is-plain-object

Checks whether the provided object is a plain JavaScript object.

  • 1.2.1
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@pacote/is-plain-object

version minified minified + gzip

Checks whether the provided value is a plain JavaScript object.

Installation

yarn add @pacote/is-plain-object

Usage

import { isPlainObject } from '@pacote/is-plain-object'

// These return true:
isPlainObject({})
isPlainObject({ an: 'object' })

// All of these return false:
isPlainObject(undefined)
isPlainObject(null)
isPlainObject(false)
isPlainObject(true)
isPlainObject(NaN)
isPlainObject(Infinity)
isPlainObject(0)
isPlainObject('string')
isPlainObject([])
isPlainObject(new ArrayBuffer(0))
isPlainObject(new Date())
isPlainObject(new Map())
isPlainObject(new Promise())
isPlainObject(new Set())
isPlainObject(new WeakMap())
isPlainObject(new WeakSet())

isPlainObject(o: any): boolean

isPlainObject() takes a single value and checks whether it is a plain object. May be used as a type guard.

License

MIT © Luís Rodrigues.

Keywords

FAQs

Package last updated on 13 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc